<!doctype html>
<html class="no-js" lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>
    
  技术周边 - NeilBlog
  
  </title>
  
  
  <link href="atom.xml" rel="alternate" title="NeilBlog" type="application/atom+xml">
    <link rel="stylesheet" href="asset/css/foundation.min.css" />
    <link rel="stylesheet" href="asset/css/docs.css" />
    <script src="asset/js/vendor/modernizr.js"></script>
    <script src="asset/js/vendor/jquery.js"></script>
  <script src="asset/highlightjs/highlight.pack.js"></script>
  <link href="asset/highlightjs/styles/github.css" media="screen, projection" rel="stylesheet" type="text/css">
  <script>hljs.initHighlightingOnLoad();</script>
<script type="text/javascript">
  function before_search(){
    var searchVal = 'site: ' + document.getElementById('search_input').value;
    document.getElementById('search_q').value = searchVal;
    return true;
  }
</script>
  </head>
  <body class="antialiased hide-extras">
    
    <div class="marketing off-canvas-wrap" data-offcanvas>
      <div class="inner-wrap">


<nav class="top-bar docs-bar hide-for-small" data-topbar>


  <section class="top-bar-section">
  <div class="row">
      <div style="position: relative;width:100%;"><div style="position: absolute; width:100%;">
        <ul id="main-menu" class="left">
        
        <li id=""><a target="self" href="index.html">Home</a></li>
        
        <li id=""><a target="_self" href="archives.html">Archives</a></li>
        
        </ul>

        <ul class="right" id="search-wrap">
          <li>
<form target="_blank" onsubmit="return before_search();" action="https://google.com/search" method="get">
    <input type="hidden" id="search_q" name="q" value="" />
    <input tabindex="1" type="search" id="search_input"  placeholder="Search"/>
</form>
</li>
          </ul>
      </div></div>
  </div>
  </section>

</nav>

        <nav class="tab-bar show-for-small">
  <a href="javascript:void(0)" class="left-off-canvas-toggle menu-icon">
    <span> &nbsp; NeilBlog</span>
  </a>
</nav>

<aside class="left-off-canvas-menu">
      <ul class="off-canvas-list">
        
        <li><a target="self" href="index.html">Home</a></li>
        
        <li><a target="_self" href="archives.html">Archives</a></li>
        

    <li><label>Categories</label></li>

        
            <li><a href="Python.html">Python</a></li>
        
            <li><a href="opentstack-neutron.html">opentstack-neutron</a></li>
        
            <li><a href="%E6%8A%80%E6%9C%AF%E5%91%A8%E8%BE%B9.html">技术周边</a></li>
        
            <li><a href="%E9%A1%B9%E7%9B%AE%E7%AC%94%E8%AE%B0.html">项目笔记</a></li>
         

      </ul>
    </aside>

<a class="exit-off-canvas" href="#"></a>


        <section id="main-content" role="main" class="scroll-container">
        
       

 <script type="text/javascript">
	$(function(){
		$('#menu_item_index').addClass('is_active');
	});
</script>
<div class="row">
	<div class="large-8 medium-8 columns">
		<div class="markdown-body home-categories">
		
			<div class="article">
                <a class="clearlink" href="15617121531390.html">
                
                  <h1></h1>
                  <div class="a-content">
                      
                      <div class="a-content-text">
                        
                        	<h1 id="toc_0">有趣的terminal命令</h1>

<ul>
<li>
<a href="#toc_0">有趣的terminal命令</a>
<ul>
<li>
<a href="#toc_1">MAC terminal下显示目录树</a>
</li>
<li>
<a href="#toc_2">zip解压命令</a>
</li>
</ul>
</li>
</ul>


<h2 id="toc_1">MAC terminal下显示目录树</h2>

<p>安装tree命令 brew install tree</p>

<pre><code class="language-text">bogon:eggtest ulysses$ brew install tree
==&gt; Downloading https://homebrew.bintray.com/bottles/tree-1.8.0.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==&gt; Pouring tree-1.8.0.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/tree/1.8.0: 8 files, 117KB
</code></pre>

<p>tree -L 1 显示当前目录下的1级目录</p>

<pre><code class="language-text">bogon:eggtest ulysses$ tree -L 1
.
├── __init__.py
├── build
├── create_egg.egg-info
├── create_egg.py
├── dist
└── setup.py

3 directories, 3 files
</code></pre>

<p>tree -a 显示当前目录所有的目录结构</p>

<pre><code class="language-text">bogon:eggtest ulysses$ tree -a
.
├── __init__.py
├── build
│   └── bdist.macosx-10.13-intel
├── create_egg.egg-info
│   ├── PKG-INFO
│   ├── SOURCES.txt
│   ├── dependency_links.txt
│   └── top_level.txt
├── create_egg.py
├── dist
│   └── create_egg-0.1-py2.7.egg
└── setup.py

4 directories, 8 files
</code></pre>

<p>tree -I &quot;dist&quot; 不显示dist目录</p>

<pre><code class="language-text">bogon:eggtest ulysses$ tree -I dist
.
├── __init__.py
├── build
│   └── bdist.macosx-10.13-intel
├── create_egg.egg-info
│   ├── PKG-INFO
│   ├── SOURCES.txt
│   ├── dependency_links.txt
│   └── top_level.txt
├── create_egg.py
└── setup.py

3 directories, 7 files
</code></pre>

<h2 id="toc_2">zip解压命令</h2>

<p>安装zip</p>

<pre><code class="language-text">bogon:eggtest ulysses$ brew install zip
==&gt; Downloading https://homebrew.bintray.com/bottles/zip-3.0.high_sierra.bottle.1.tar.gz
==&gt; Downloading from https://akamai.bintray.com/d2/d218e0b7d82c7864a1ead12186b5bc09b43c2aa3749651008ac8dbcf32ec0d7c?__gda__=exp=1561714708~hmac=a7e35f8381e63d1f8a6805d4ab1b89cf50b556929ec4f3ad9bcfad82b30c7f77&amp;response-content-dispos
######################################################################## 100.0%
==&gt; Pouring zip-3.0.high_sierra.bottle.1.tar.gz
==&gt; Caveats
zip is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have zip first in your PATH run:
  echo &#39;export PATH=&quot;/usr/local/opt/zip/bin:$PATH&quot;&#39; &gt;&gt; ~/.bash_profile

==&gt; Summary
🍺  /usr/local/Cellar/zip/3.0: 14 files, 755.8KB
</code></pre>

<p>用unzip -l命令显示包的内容</p>

<pre><code class="language-text">bogon:eggtest ulysses$ unzip -l dist/create_egg-0.1-py2.7.egg 
Archive:  dist/create_egg-0.1-py2.7.egg
  Length      Date    Time    Name
---------  ---------- -----   ----
      182  06-28-2019 16:50   EGG-INFO/PKG-INFO
        1  06-28-2019 16:50   EGG-INFO/zip-safe
      144  06-28-2019 16:50   EGG-INFO/SOURCES.txt
        1  06-28-2019 16:50   EGG-INFO/top_level.txt
        1  06-28-2019 16:50   EGG-INFO/dependency_links.txt
---------                     -------
      329                     5 files
bogon:eggtest ulysses$ 
</code></pre>

<p>命令详解:<br/>
<a href="https://blog.csdn.net/yxys01/article/details/73848720">https://blog.csdn.net/yxys01/article/details/73848720</a></p>

                        
                      </div>
                  </div>
                </a>
                <div class="read-more clearfix">
                  <div class="more-left left">
                  
                    <span class="date">2019/6/28</span>
                    <span>posted in&nbsp;</span> 
          				  
          					    <span class="posted-in"><a href='%E6%8A%80%E6%9C%AF%E5%91%A8%E8%BE%B9.html'>技术周边</a></span>
          				   
                  </div>
                  <div class="more-right right">
                  <span class="comments">
                      

                       
                  </span>
                  </div>
                </div>
              </div><!-- article -->
        
              


			<div class="row">
			  <div class="large-6 columns">
			  <p class="text-left" style="padding-top:25px;">
			   
			  </p>
			  </div>
			  <div class="large-6 columns">
			<p class="text-right" style="padding-top:25px;">
			
			</p>
			  </div>
			</div>
		</div>
	</div><!-- large 8 -->

 <div class="large-4 medium-4 columns">
  <div class="hide-for-small">
    <div id="sidebar" class="sidebar">
          <div id="site-info" class="site-info">
            
                <h1>NeilBlog</h1>
                <div class="site-des"></div>
                <div class="social">











  <a target="_blank" class="rss" href="atom.xml" title="RSS">RSS</a>
                
              	 </div>
          	</div>

             

              <div id="site-categories" class="side-item ">
                <div class="side-header">
                  <h2>Categories</h2>
                </div>
                <div class="side-content">

      	<p class="cat-list">
        
            <a href="Python.html"><strong>Python</strong></a>
        
            <a href="opentstack-neutron.html"><strong>opentstack-neutron</strong></a>
        
            <a href="%E6%8A%80%E6%9C%AF%E5%91%A8%E8%BE%B9.html"><strong>技术周边</strong></a>
        
            <a href="%E9%A1%B9%E7%9B%AE%E7%AC%94%E8%AE%B0.html"><strong>项目笔记</strong></a>
         
        </p>


                </div>
              </div>

              <div id="site-categories" class="side-item">
                <div class="side-header">
                  <h2>Recent Posts</h2>
                </div>
                <div class="side-content">
                <ul class="posts-list">
	      
		      
			      <li class="post">
			        <a href="15623333744762.html">bytes/string转换</a>
			      </li>
		     
		  
		      
			      <li class="post">
			        <a href="15622929808447.html">netconf client通信框架</a>
			      </li>
		     
		  
		      
			      <li class="post">
			        <a href="15621228986145.html">devstack 安装openstack</a>
			      </li>
		     
		  
		      
			      <li class="post">
			        <a href="15620552731750.html">neutron agent 使用netconf向设备下发配置</a>
			      </li>
		     
		  
		      
			      <li class="post">
			        <a href="15620392963346.html">loggging模块</a>
			      </li>
		     
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		   
		  		</ul>
                </div>
              </div>
        </div><!-- sidebar -->
      </div><!-- hide for small -->
</div><!-- large 4 -->

</div><!-- row -->

 <div class="page-bottom clearfix">
  <div class="row">
   <p class="copyright">Copyright &copy; 2015
Powered by <a target="_blank" href="http://www.mweb.im">MWeb</a>,&nbsp; 
Theme used <a target="_blank" href="http://github.com">GitHub CSS</a>.</p>
  </div>
</div>

        </section>
      </div>
    </div>

  
    

    <script src="asset/js/foundation.min.js"></script>
    <script>
      $(document).foundation();
      function fixSidebarHeight(){
        var w1 = $('.markdown-body').height();
          var w2 = $('#sidebar').height();
          if (w1 > w2) { $('#sidebar').height(w1); };
      }
      $(function(){
        fixSidebarHeight();
      })
      $(window).load(function(){
          fixSidebarHeight();
      });
     
    </script>

    
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><script type="text/x-mathjax-config">MathJax.Hub.Config({TeX: { equationNumbers: { autoNumber: "AMS" } }});</script>


  </body>
</html>
